<template>
  <div
    class="control-container"
    :class="{
      'control-compare-position': compare,
      control: !compare
    }"
  >
    <el-row>
      <el-button type="primary" @click="proceed"
        >开始</el-button
      >
      <el-button type="warning" @click="pause"
        >暂停</el-button
      >
      <el-button type="danger" @click="stop"
        >停止</el-button
      >
    </el-row>
  </div>
</template>

<script>
export default {
  props: ['compare'],
  data() {
    return {}
  },
  methods: {
    proceed() {
      this.$bus.$emit('flyLineProceed')
    },
    pause() {
      this.$bus.$emit('flyLinePause')
    },
    stop() {
      this.$bus.$emit('flyLineStop')
    }
  }
}
</script>

<style lang="scss" scoped>
.control-container {
  box-shadow: 0 0 8px 0 #057595;
  border-radius: 8px;
  background-color: #223a4f;
  display: flex;
  flex-direction: row;
  padding: 5px;
}

.control-compare-position {
  position: absolute;
  left: 25vw;
  bottom: 100px;
  transform: translateX(-50%);

  .el-row {
    display: flex;
    flex-direction: row;
  }
}

.control {
  position: fixed;
  //top: 80px;
  bottom: 100px;
  right: 50%;
  transform: translateX(50%);
}
</style>
